package com.xxxy.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxy.model.StudentAnswer;
import com.xxxy.response.StudentAnswerResponse;
import com.xxxy.response.StudentPaperResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author sjh
 * @date 2022/3/5 13:42
 */
public interface StudentAnswerService extends IService<StudentAnswer> {
    /**
     * 学生交卷，同时将选择判断进行打分
     *
     * @param examId
     * @param StudentAccount
     * @param teachingClassId
     * @param answerSituation
     * @return
     */
    Boolean putPaper(Integer examId, String StudentAccount, Integer teachingClassId, String answerSituation);

    /**
     * 成绩分析
     *
     * @param teachingClassIdArray 教学班字符串
     * @param paperId
     * @return
     */
    Map<String, String> gradeDistribution(String teachingClassIdArray, Integer paperId);

    /**
     * 学生自查分数情况
     *
     * @param studentAccount
     * @return
     */
    StudentAnswerResponse getScoreStudent(String studentAccount, Integer examId);

    /**
     * 学生获取考试
     *
     * @param studentAccount
     * @return
     */
    List<StudentPaperResponse> getExamPaper(String studentAccount);

    /**
     * 图片上传
     * @param multipartFile
     * @return
     * @throws IOException
     */
    String imageUpload(MultipartFile multipartFile) throws IOException;
}
